package com.copa.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.copa.entity.Games;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author copa
 * @createDate 2022-02-24 22:51
 * @function
 */
@Mapper
public interface GamesDao extends BaseMapper<Games> {

    @Select("SELECT * FROM games WHERE sale_time = #{saleTime} OR sale_time = date_format(NOW(), '%Y-%m')")
    List<Games> selectBySaleTime(@Param("saleTime") String saleTime);
}
